home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 65.zip / BS1 part 65 / DevPac v3.02b.adf / include / libraries / configregs.i < prev    next >
Text File  |  1991-11-20  |  6KB  |  193 lines

  1.     IFND    LIBRARIES_CONFIGREGS_I
  2. LIBRARIES_CONFIGREGS_I    SET    1
  3. **
  4. **    $Filename: libraries/configregs.i $
  5. **    $Release: 1.3 $
  6. **
  7. **    register and bit definitions for expansion boards 
  8. **
  9. **    (C) Copyright 1986,1987,1988 Commodore-Amiga, Inc.
  10. **        All Rights Reserved
  11. **
  12.  
  13. ** Expansion boards are actually organized such that only one nibble per
  14. ** word (16 bits) are valid information.  This table is structured
  15. ** as LOGICAL information.  This means that it never corresponds
  16. ** exactly with a physical implementation.
  17. **
  18. ** The expansion space is logically split into two regions:
  19. ** a rom portion and a control portion.     The rom portion is
  20. ** actually stored in one's complement form (except for the
  21. ** er_type field).
  22.  
  23.  
  24.  STRUCTURE ExpansionRom,0
  25.     UBYTE    er_Type
  26.     UBYTE    er_Product
  27.     UBYTE    er_Flags
  28.     UBYTE    er_Reserved03
  29.     UWORD    er_Manufacturer
  30.     ULONG    er_SerialNumber
  31.     UWORD    er_InitDiagVec
  32.     UBYTE    er_Reserved0c
  33.     UBYTE    er_Reserved0d
  34.     UBYTE    er_Reserved0e
  35.     UBYTE    er_Reserved0f
  36.     LABEL    ExpansionRom_SIZEOF
  37.  
  38.  STRUCTURE ExpansionControl,0
  39.     UBYTE    ec_Interrupt        ; interrupt control register
  40.     UBYTE    ec_Reserved11
  41.     UBYTE    ec_BaseAddress        ; set new config address
  42.     UBYTE    ec_Shutup        ; don't respond, pass config out
  43.     UBYTE    ec_Reserved14
  44.     UBYTE    ec_Reserved15
  45.     UBYTE    ec_Reserved16
  46.     UBYTE    ec_Reserved17
  47.     UBYTE    ec_Reserved18
  48.     UBYTE    ec_Reserved19
  49.     UBYTE    ec_Reserved1a
  50.     UBYTE    ec_Reserved1b
  51.     UBYTE    ec_Reserved1c
  52.     UBYTE    ec_Reserved1d
  53.     UBYTE    ec_Reserved1e
  54.     UBYTE    ec_Reserved1f
  55.     LABEL    ExpansionControl_SIZEOF
  56.  
  57. **
  58. ** many of the constants below consist of a triplet of equivalent
  59. ** definitions: xxMASK is a bit mask of those bits that matter.
  60. ** xxBIT is the starting bit number of the field.  xxSIZE is the
  61. ** number of bits that make up the definition.    This method is
  62. ** used when the field is larger than one bit.
  63. **
  64. ** If the field is only one bit wide then the xxB_xx and xxF_xx convention
  65. ** is used (xxB_xx is the bit number, and xxF_xx is mask of the bit).
  66. **
  67.  
  68. ** manifest constants */
  69. E_SLOTSIZE        EQU    $10000
  70. E_SLOTMASK        EQU    $ffff
  71. E_SLOTSHIFT        EQU    16
  72.  
  73. ** these define the two free regions of Zorro memory space.
  74. ** THESE MAY WELL CHANGE FOR FUTURE PRODUCTS!
  75. E_EXPANSIONBASE        EQU    $e80000
  76. E_EXPANSIONSIZE        EQU    $080000
  77. E_EXPANSIONSLOTS    EQU    8
  78.  
  79. E_MEMORYBASE        EQU    $200000
  80. E_MEMORYSIZE        EQU    $800000
  81. E_MEMORYSLOTS        EQU    128
  82.  
  83.  
  84.  
  85. ******* ec_Type definitions */
  86.  
  87. ** board type -- ignore "old style" boards */
  88. ERT_TYPEMASK        EQU    $c0
  89. ERT_TYPEBIT        EQU    6
  90. ERT_TYPESIZE        EQU    2
  91. ERT_NEWBOARD        EQU    $c0
  92.  
  93.  
  94. ** type field memory size */
  95. ERT_MEMMASK        EQU    $07
  96. ERT_MEMBIT        EQU    0
  97. ERT_MEMSIZE        EQU    3
  98.  
  99.  
  100. ** other bits defined in type field */
  101.     BITDEF    ERT,CHAINEDCONFIG,3
  102.     BITDEF    ERT,DIAGVALID,4
  103.     BITDEF    ERT,MEMLIST,5
  104.  
  105.  
  106. ** er_Flags byte -- for those things that didn't fit into the type byte */
  107.     BITDEF    ERF,MEMSPACE,7        ; wants to be in 8 meg space.  Also
  108.                     ;     implies that board is moveable
  109.     BITDEF    ERF,NOSHUTUP,6        ; board can't be shut up.  Must not
  110.                     ;     be a board.  Must be a box that
  111.                     ;     does not pass on the bus.
  112.  
  113.  
  114. ** interrupt control register */
  115.     BITDEF    ECI,INTENA,1
  116.     BITDEF    ECI,RESET,3
  117.     BITDEF    ECI,INT2PEND,4
  118.     BITDEF    ECI,INT6PEND,5
  119.     BITDEF    ECI,INT7PEND,6
  120.     BITDEF    ECI,INTERRUPTING,7
  121.  
  122.  
  123. **************************************************************************
  124. **
  125. ** these are the specifications for the diagnostic area.  If the Diagnostic
  126. ** Address Valid bit is set in the Board Type byte (the first byte in
  127. ** expansion space) then the Diag Init vector contains a valid offset.
  128. **
  129. ** The Diag Init vector is actually a word offset from the base of the
  130. ** board.  The resulting address points to the base of the DiagArea
  131. ** structure.  The structure may be physically implemented either four,
  132. ** eight, or sixteen bits wide.     The code will be copied out into
  133. ** ram first before being called.
  134. **
  135. ** The da_Size field, and both code offsets (da_DiagPoint and da_BootPoint)
  136. ** are offsets from the diag area AFTER it has been copied into ram, and
  137. ** "de-nibbleized" (if needed).     Inotherwords, the size is the size of
  138. ** the actual information, not how much address space is required to
  139. ** store it.
  140. **
  141. ** All bits are encoded with uninverted logic (e.g. 5 volts on the bus
  142. ** is a logic one).
  143. **
  144. ** If your board is to make use of the boot facility then it must leave
  145. ** its config area available even after it has been configured.     Your
  146. ** boot vector will be called AFTER your board's final address has been
  147. ** set.
  148. **
  149. **************************************************************************
  150.  
  151.  STRUCTURE DiagArea,0
  152.     UBYTE    da_Config    ; see below for definitions
  153.     UBYTE    da_Flags    ; see below for definitions
  154.     UWORD    da_Size        ; the size (in bytes) of the total diag area
  155.     UWORD    da_DiagPoint    ; where to start for diagnostics, or zero
  156.     UWORD    da_BootPoint    ; where to start for booting
  157.     UWORD    da_Name        ; offset in diag area where a string
  158.                 ;   identifier can be found (or zero if no
  159.                 ;   identifier is present).
  160.  
  161.     UWORD    da_Reserved01    ; two words of reserved data.  must be zero.
  162.     UWORD    da_Reserved02
  163.     LABEL    DiagArea_SIZEOF
  164.  
  165. ; da_Config definitions
  166. DAC_BUSWIDTH    EQU    $C0    ; two bits for bus width
  167. DAC_NIBBLEWIDE    EQU    $00
  168. DAC_BYTEWIDE    EQU    $40
  169. DAC_WORDWIDE    EQU    $80
  170.  
  171. DAC_BOOTTIME    EQU    $30    ; two bits for when to boot
  172. DAC_NEVER    EQU    $00    ; obvious
  173. DAC_CONFIGTIME    EQU    $10    ; call da_BootPoint when first configing the
  174.                 ;   the device
  175. DAC_BINDTIME    EQU    $20    ; run when binding drivers to boards
  176.  
  177. **
  178. ** These are the calling conventions for Diag or Boot area
  179. **
  180. ** A7 -- points to at least 2K of stack
  181. ** A6 -- ExecBase
  182. ** A5 -- ExpansionBase
  183. ** A3 -- your board's ConfigDev structure
  184. ** A2 -- Base of diag/init area that was copied
  185. ** A0 -- Base of your board
  186. **
  187. ** Your board should return a value in D0.  If this value is NULL, then
  188. ** the diag/init area that was copied in will be returned to the free
  189. ** memory pool.
  190. **
  191.  
  192.     ENDC    ; LIBRARIES_CONFIGREGS_I
  193.